@import 'tailwindcss/base';
@import 'tailwindcss/components';
@import 'tailwindcss/utilities';

/* 自定义字体 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&display=swap');

/* 全局样式重置 */
* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: #f5f7fa;
  color: #2c3e50;
  overflow: hidden;
}

#app {
  height: 100vh;
  width: 100vw;
  display: flex;
  flex-direction: column;
}

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* Element Plus 自定义样式 */
.el-tree {
  background: transparent !important;
}

.el-tree-node__content {
  height: 32px !important;
  border-radius: 4px;
  margin: 1px 0;
  transition: all 0.2s ease;
}

.el-tree-node__content:hover {
  background-color: #f0f9ff !important;
}

.el-tree-node.is-current > .el-tree-node__content {
  background-color: #e0f2fe !important;
  color: #0369a1 !important;
  font-weight: 500;
}

.el-tabs__header {
  margin: 0 !important;
  border-bottom: 1px solid #e5e7eb !important;
}

.el-tabs__nav-wrap::after {
  display: none !important;
}

.el-tabs__item {
  height: 40px !important;
  line-height: 40px !important;
  padding: 0 16px !important;
  border-radius: 6px 6px 0 0 !important;
  margin-right: 2px !important;
  transition: all 0.2s ease !important;
}

.el-tabs__item.is-active {
  background-color: #ffffff !important;
  border-bottom: 2px solid #3b82f6 !important;
}

/* 连接状态指示器 */
.connection-status {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
}

.connection-status.connected {
  background-color: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.connection-status.disconnected {
  background-color: #ef4444;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
}

.connection-status.connecting {
  background-color: #f59e0b;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* 代码编辑器样式 */
.monaco-editor {
  border-radius: 6px;
  border: 1px solid #e5e7eb;
}

/* 分割面板样式 */
.splitpanes__pane {
  transition: none !important;
}

.splitpanes__splitter {
  background-color: #e5e7eb !important;
  border: none !important;
  position: relative;
}

.splitpanes__splitter:hover {
  background-color: #d1d5db !important;
}

.splitpanes--vertical > .splitpanes__splitter {
  width: 4px !important;
  cursor: col-resize;
}

.splitpanes--horizontal > .splitpanes__splitter {
  height: 4px !important;
  cursor: row-resize;
}

/* 工具栏样式 */
.toolbar {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 侧边栏样式 */
.sidebar {
  background: #ffffff;
  border-right: 1px solid #e5e7eb;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.05);
}

/* 内容区域样式 */
.content-area {
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin: 8px;
  overflow: hidden;
}

/* 表格样式增强 */
.vtable-container {
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  overflow: hidden;
}

/* 加载动画 */
.loading-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 响应式设计 */
@media (max-width: 768px) {
  .sidebar {
    position: absolute;
    z-index: 1000;
    height: 100%;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }
  
  .sidebar.mobile-open {
    transform: translateX(0);
  }
} 